﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.S.DataBase.MyProject.Infrastructure.Migrations
{
    public partial class 王东暄十年寿命 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "BuLiANGnumber",
                table: "GongDanLiuCheng",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "HeGeNumber",
                table: "GongDanLiuCheng",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "ZJStatus",
                table: "GongDanLiuCheng",
                type: "tinyint(1)",
                nullable: true);

            migrationBuilder.AlterColumn<DateTime>(
                name: "UpdateTime",
                table: "ArrivalCheck",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldNullable: true);

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "ArrivalCheck",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "CheckStatus",
                table: "ArrivalCheck",
                type: "int",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AlterColumn<string>(
                name: "RoleName",
                table: "ApprovalTrails",
                type: "longtext",
                nullable: false,
                oldClrType: typeof(int),
                oldType: "int")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BuLiANGnumber",
                table: "GongDanLiuCheng");

            migrationBuilder.DropColumn(
                name: "HeGeNumber",
                table: "GongDanLiuCheng");

            migrationBuilder.DropColumn(
                name: "ZJStatus",
                table: "GongDanLiuCheng");

            migrationBuilder.AlterColumn<DateTime>(
                name: "UpdateTime",
                table: "ArrivalCheck",
                type: "datetime(6)",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "ArrivalCheck",
                type: "datetime(6)",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)");

            migrationBuilder.AlterColumn<int>(
                name: "CheckStatus",
                table: "ArrivalCheck",
                type: "int",
                nullable: false,
                defaultValue: 0,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "RoleName",
                table: "ApprovalTrails",
                type: "int",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "longtext")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }
    }
}
